{% extends 'base.html' %}
{% block title %} 行业新闻 {% endblock %}
{% block content %}
<main class="page blog-post-list">
  <section class="clean-block clean-blog-list dark">


    <div class="container">
      <div class="block-heading">
        <h2 class="text-info">Blog Post List</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc quam urna,
          dignissim
          nec
          auctor in,
          mattis vitae leo.</p>
      </div>
      <div class="block-content" style="padding:10px 10px 10px">
        <div class="clean-blog-post">
          <div class="row">
            <div class="container" style="text-align: -webkit-center">

              <div class="table table-borderless  table-responsive-sm">
                <table class=" table-borderless">
                  <thead>
                  <tr>
                    <th class="text-center" style="align:center">序号</th>
                    <th class="text-center"
                        style="vertical-align: middle; align-content: center">标题
                    </th>
                    <th class="text-center"
                        style="vertical-align: middle; align-content: center">日期
                    </th>
                  </tr>
                  </thead>

                  <tbody>
                  {% for stus in stus %}


                  <tr>
                    <td class="text-center" style="vertical-align: middle"><a
                      href="{{url_for('post', post_id=stus.id )}}"> {{ stus.id }} </a>
                    </td>
                    <td style="vertical-align: middle; text-align: left"><a
                      href="{{url_for('post', post_id=stus.id )}}"> {{ stus.title }} </a>
                    </td>
                    <td class="text-center" style="vertical-align: middle"><a
                      href="{{url_for('post', post_id=stus.id )}}"> {{ stus.created }} </a>
                    </td>

                  </tr>


                  {% endfor %}
                  </tbody>

                </table>
              </div>
              <nav>
                <ul class="pagination justify-content-center">

                  {% if paginate.has_prev %}
                  <li class="page-link"><a
                    href="{{url_for('postlistnew')}}?page={{ paginate.prev_num }}">上一页</a>
                  </li>
                  {% endif %}

                  {% for num in range(1,2) %}


                  <li class="page-item">
                    <a class="page-link"
                       href="{{url_for('postlistnew')}}?page={{num-1}}">{{paginate.page-1}}</a>
                  </li>

                  <li class="page-item">
                    <a class="page-link"
                       href="{{url_for('postlistnew')}}?page={{num}}">{{paginate.page}}</a>
                  </li>

                  <li class="page-item">
                    <a class="page-link"
                       href="{{url_for('postlistnew')}}?page={{num+1}}">{{paginate.page+1}}</a>
                  </li>


                  {% endfor %}

                  {% if paginate.has_next %}
                  <li class="page-link"><a
                    href="{{url_for('postlistnew')}}?page={{ paginate.next_num }}"
                    aria-label="Next">下一页</a></li>
                  {% endif %}

                </ul>
              </nav>
            </div>
          </div>
        </div>
      </div>
    </div>


  </section>
</main>

{% endblock %}




